﻿using Microsoft.AspNetCore.Http;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WH.Services.Middleware
{
    public class OrgContextMiddleware
    {

        /// <summary>
        /// 
        /// </summary>
        public readonly RequestDelegate _next;
        /// <summary>
        /// 
        /// </summary>
        public OrgContextMiddleware(RequestDelegate next)
        {
            _next = next;
        }


        public async Task InvokeAsync(HttpContext context, IHttpContextAccessor httpContextAccessor)
        {
            WH.Common.Web.HttpContext.Configure(httpContextAccessor);

            await _next(context);
        }
    }
}
